package com.sample.Toast;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class ToastActivity extends Activity implements OnClickListener {
    Button buttonOne;
    EditText text;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        buttonOne=(Button)findViewById(R.id.button1);
        buttonOne.setOnClickListener(this);
        text=(EditText)findViewById(R.id.editText1);
        }
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Toast.makeText(this, text.getText().toString(), Toast.LENGTH_LONG).show();	
	}
    }